Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

nathanaelbosch/pick-and-mix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pick-and-Mix Information Operators for Probabilistic ODE Solvers - Code

This repo contains the code which was used to compute the results of the paper "Pick-and-Mix Information Operators for Probabilistic ODE Solvers", accepted at AISTATS 2022.

Figure 1


To solve differential equations in Julia with probabilistic numerical solvers, have a look at our package ProbNumDiffEq.jl. Much of the new functionality presented in this paper is already available in ProbNumDiffEq.jl and will be covered in the documentation.


A Python implementation of probabilistic numerical ODE solvers, as well as many other probabilistic numerical methods, is maintained in ProbNum (pip install probnum).


Running the code to recreate our experiments

First open julia, activate the local environment, and instantiate it to install all the packages:

julia> ]
(v1.7) pkg> activate .
(v1.7) pkg> instantiate

and you can quit the pkg environment by hitting backspace.

To run a julia script from the Julia REPL, do

julia> include("myscript.jl")

Generating figure 1

Run the script ./experiments/0_kepler_samples/main.jl to obtain ./experiments/0_kepler_samples/figure1.pdf (shown above).

Case study 1: Second-order ODEs

The experiment script is ./experiments/1_secondorder_odes/1_compute_solutions.jl. Then, with ./experiments/1_secondorder_odes/2_plot_solutions.jl you obtain the plot

Figure 2

Case study 2: Additional second-derivative information

The experimentc can be run with

  • ./experiments/2_additional_derivatives/2.1_lotkavolterra.jl
  • ./experiments/2_additional_derivatives/2.2_vanderpol.jl

Then, to plot run ./experiments/2_additional_derivatives/3_plot_all.jl

Figure 3

Case study 3: Dynamical systems with conserved quantities

For figure 4, run (in order):

  • ./experiments/3_conserved_quantities/1.1_generate_workprecision_data.jl
  • ./experiments/3_conserved_quantities/1.2_workprecision_plot.jl

Figure 4

./experiments/3_conserved_quantities/2_longtermplot.jl to get figure 5:

Figure 5

And ./experiments/3_conserved_quantities/3_inflated_kepler_samples.jl to get figure 6:

Figure 6

Case study 4: Mass-matrix differential-algebraic equations

To run the experiments and make the plot, run (in order)

  • ./experiments/4_massmatrices/1.1_pendulum.jl
  • ./experiments/4_massmatrices/1.2_rober.jl
  • ./experiments/4_massmatrices/2_plot.jl

Figure 7

Reference

@InProceedings{pmlr-v151-bosch22a,
  title = 	 { Pick-and-Mix Information Operators for Probabilistic ODE Solvers },
  author =       {Bosch, Nathanael and Tronarp, Filip and Hennig, Philipp},
  booktitle = 	 {Proceedings of The 25th International Conference on Artificial Intelligence and Statistics},
  pages = 	 {10015--10027},
  year = 	 {2022},
  editor = 	 {Camps-Valls, Gustau and Ruiz, Francisco J. R. and Valera, Isabel},
  volume = 	 {151},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {28--30 Mar},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v151/bosch22a/bosch22a.pdf},
  url = 	 {https://proceedings.mlr.press/v151/bosch22a.html},
  abstract = 	 { Probabilistic numerical solvers for ordinary differential equations compute posterior distributions over the solution of an initial value problem via Bayesian inference. In this paper, we leverage their probabilistic formulation to seamlessly include additional information as general likelihood terms. We show that second-order differential equations should be directly provided to the solver, instead of transforming the problem to first order. Additionally, by including higher-order information or physical conservation laws in the model, solutions become more accurate and more physically meaningful. Lastly, we demonstrate the utility of flexible information operators by solving differential-algebraic equations. In conclusion, the probabilistic formulation of numerical solvers offers a flexible way to incorporate various types of information, thus improving the resulting solutions. }
}

About

Pick-and-Mix Information Operators for Probabilistic ODE Solvers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages